Welcome to Xceed DataGrid for Silverlight > Styles, Themes, and Templates > Styling and Templating in Blend > Visual States |
Visual states define the appearance of an element when it is in a particular state. Each state is part of an orthogonal state group (see VisualStateGroup class), meaning that a control can be in more than one state as long as each state is part of a different group.
Some state groups define alternate states, which are used when alternating row styles are applied. These alternate states, which are identified in the tables below, can be disabled by setting the grid's AreAlternateStatesEnabled property to false.
Within each state group there is a "default" state that is used when a control is in its "most common" state. Default states, which are identified in the tables below, should not trigger Storyboards in order to avoid performance issues. |
The following tables provide a list of all the visual states that can be used by a control template's VisualStateManager.
Visual states and groups are inherited from base classes. All the bolded group names in the tables below are inherited by the derived classes. |
Table 1: Visual states for the Cell and Cell-derived classes
Class | Group | State | Description | Default |
---|---|---|---|---|
Cell | CommonStates | Normal | The default state. | |
MouseOver | The state that is triggered when the mouse is over a cell. | |||
Dragged | The state that is triggered when a cell is dragged. | |||
ColumnManagerCell | CommonStates | Pressed | The state that is triggered when a column-manager cell is pressed. | |
Cell | CurrentStates | Current | The state that is triggered when a cell is current. | |
NotCurrent | The state that is triggered when a cell is not current. | |||
InitializationStates | Initialized | The state that is triggered when a data row is initialized. | ||
Uninitialized | The state that is triggered when a data row is not initialized. | |||
ColumnManagerCell | ColumnVisibiltyStates | Scrolling | The state that is triggered when a column is scrolling (non-fixed). | |
Fixed | The state that is triggered when a column is fixed. | |||
ColumnManagerCell | SortStates | Ascending | The state that is triggered when a column-manager cell displays the ascending sort glyph. | |
Descending | The state that is triggered when a column-manager cell displays the descending sort glyph. | |||
None | The state that is triggered when a column-manager cell does not display a sort glyph. | |||
FilterCell | ReadOnlyStates | Active | The state that is triggered when a filter cell is not read only. | |
Inactive | The state that is triggered when a filter cell is read only. | |||
FilterStates | NoFilter | The state that is triggered when a filter cell doesn't have an active filter. | ||
HasFilter | The state that is triggered when a filter cell has an active filter. | |||
ColumnManagerCell | FixedColumnToggleButtonVisibiltyStates | FixedColumnToggleButtonHidden | The state that is triggered when the fixed-column toggle button is hidden. | |
FixedColumnToggleButtonVisible | The state that is triggered when the fixed-column toggle button is visible. | |||
StatCell | ResultStates | IsEstimate | The state that is triggered when the stat cell displays an estimated result. | |
IsDefinite | The state that is triggered when the stat cell displays the definite result. | |||
LocationStates | GridHeader | The state that is triggered when a stat cell is located in the header section of a grid. | ||
GridFooter | The state that is triggered when a stat cell is located in the footer section of a grid. | |||
GroupHeader | The state that is triggered when a stat cell is located in the header section of a group. | |||
GroupFooter | The state that is triggered when a stat cell is located in the footer section of a group. | |||
EditableCell | EditingStates | NotBeingEdited | The state that is triggered when a row is not being edited. | |
BeingEdited | The state that is triggered when a row is being edited. | |||
Committing | The state that is triggered when a row's content is being committed. | |||
ValidationStates | ValidData | The state that is triggered when a row contains valid data. | ||
InvalidData | The state that is triggered when a row contains invalid data. |
Table 2: Visual states for the Row and Row-derived classes
Class | Group | State | Description | Default |
---|---|---|---|---|
DataRow | CommonStates | Normal | The default state. | |
Selected | The state that is triggered when a row is selected. | |||
MouseOver | The state that is triggered when the mouse is over a row. | |||
MouseOverSelected | The state that is triggered when the mouse is over a selected row. | |||
Alternate | The state that is triggered when a data row is an alternate row. | |||
AlternateMouseOver | The state that is triggered when the mouse is over an alternate data row. | |||
CurrentStates | Current | The state that is triggered when a row is current. | ||
NotCurrent | The state that is triggered when a row is not current. | |||
InitializationStates | Initialized | The state that is triggered when a data row is initialized. | ||
NotInitialized | The state that is triggered when a data row not is initialized. | |||
EditableRow | EditingStates | NotBeingEdited | The state that is triggered when a row is not being edited. | |
BeingEdited | The state that is triggered when a row is being edited. | |||
Committing | The state that is triggered when a row's content is being committed. | |||
ValidationStates | ValidData | The state that is triggered when a row contains valid data. | ||
InvalidData | The state that is triggered when a row contains invalid data. | |||
InsertionRow | WatermarkStates | WatermarkVisible | The state that is triggered when an insertion row's watermark is visible. | |
WatermarkHidden | The state that is triggered when an insertion row's watermark is hidden. | |||
StatRow | LocationStates | GridHeader | The state that is triggered when a stat row is located in the header section of a grid. | |
GridFooter | The state that is triggered when a stat row is located in the footer section of a grid. | |||
GroupHeader | The state that is triggered when a stat row is located in the header section of a group. | |||
GroupFooter | The state that is triggered when a stat row is located in the footer section of a group. |
Table 3: Visual states for the DataGridControl class
Class | Group | State | Description | Default |
---|---|---|---|---|
DataGridControl | RequestStates | NoPendingRequests | The state that is triggered when a grid has no pending requests. | |
RequestsPending | The state that is triggered when a grid has pending requests. |
Table 4: Visual states for the GroupByItem class
Class | Group | State | Description | Default |
---|---|---|---|---|
GroupByItem | CommonStates | Normal | The default state. | |
Pressed | The state that is triggered when a group-by item is pressed. | |||
MouseOver | The state that is triggered when the mouse is over a group-by item. | |||
Dragged | The state that is triggered when a group-by item is dragged. | |||
RemoveButtonVisibilityStates | RemoveButtonHidden | The state that is triggered when the remove button is hidden. | ||
RemoveButtonVisible | The state that is triggered when the remove button is visible. |
Table 5: Visual states for the NotificationControl class
Class | Group | State | Description | Default |
---|---|---|---|---|
NotificationControl | VisibilityStates | Visible | The state that is triggered when a notification control is visible. | |
Hidden | The state that is triggered when a notification controls is hidden. |
Table 6: Visual states for the WatermarkTextBox class
Class | Group | State | Description | Default |
---|---|---|---|---|
WatermarkTextBox | WatermarkStates | WatermarkVisible | The state that is triggered when a watermark text box's watermark is visible. | |
WatermarkHidden | The state that is triggered when a watermark text box's watermark is hidden. |
Table 7: Visual states for the CommittingIndicator class
Class | Group | State | Description | Default |
---|---|---|---|---|
CommittingIndicator | CommitStates | NoPendingCommit | The state that is triggered when there are no pending commit operations. | |
CommitPending | The state that is triggered when there are pending commit operations. |
Table 8: Visual states for the LoadingIndicator class
Class | Group | State | Description | Default |
---|---|---|---|---|
LoadingIndicator | RequestStates | NoPendingRequests | The state that is triggered when there are no pending requests. | |
RequestsPending | The state that is triggered when there are pending requests. |
Table 9: Visual states for the ColumnBackgroundControl class
Class | Group | State | Description | Default |
---|---|---|---|---|
ColumnBackgroundControl | ColumnVisibilityStates | Scrolling | The state that is triggered when a column background control is scrolling (non-fixed). | |
Fixed | The state that is triggered when a column background control is fixed. | |||
CurrentStates | Current | The state that is triggered when a column background control is current. | ||
NotCurrent | The state that is triggered when a column background control is not current. |